# 安装 request
# pip install requests

# 国内源
# pip install -i https://pypi.tuna.tsinghua.edu.cn/simple requests

import requests

url="https://fanyi.baidu.com/sug"
query=input("请输入你需要翻译的单词：")
data={
   "kw": query
}

resp = requests.post(url,data=data)
print(resp.json())